home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PASCALL
/
TEMPJUNK
/
SCALING.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-10-29
|
2KB
|
70 lines
program scaling;
uses
dos;
type
imageln:packed array[1..80];
procedure openimagefile(var inputfile:text; imagenumber:integer);
begin
chdir('a:\');
assign(inputfile,fexpand(concat('image',imagenumber,'.dat'));
rewrite(inputfile);
end;
program scalingprint(imageline:imageln;scale:integer);
var
i,b,c:=integer;
begin
for c:=1 to scale do
begin
i:=1
while ord(imageline[i])<>13 do
begin
for b:=1 to scale do write(imageline[i]);
i:=i+1;
end;
writeln;
end;
end;
procedure readline(var imageline:imageln; var imagedone:boolean);
var
i:integer;
begin
i:=0;
while not eoln do
begin
i:=i+1;
read(imageline[i]);
end;
if i<=1 then imagedone:=true else imagedone:=false;
end;
procedure readimage(var outputfile:text; imagenumber:integer);
var
endofimage:boolean;
imageline:imageln;
begin
endofimage:=false;
openimagefile(outputfile,imagenumber);
while not endofimage do
begin
readline(imageline,endofimage);
if not endofimage then writeln(outputfile) else close(outputfile);
end;
end;
procedure readinputimagefiles(var outputfile:text; highimagenumber:integer);
var
imagenumber:integer;
begin
imagenumber:=1;
while not eof do
begin
readimage(outputfile,imagenumber);
imagenumber:=imagenumber+1;
end;
highimagenumber:=imagenumber-1;
end;